<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label required">员工id</label>
        <div class="layui-input-block">
            <input type="text" name="empId" lay-verify="required" lay-reqtext="员工id不能为空" placeholder="请输入ID" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">员工姓名</label>
        <div class="layui-input-block">
            <input type="text" name="empName" lay-verify="required" lay-reqtext="员工姓名不能为空" placeholder="请输入用户名" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">性别</label>
        <div class="layui-input-block">
            <input type="text" name="empGender" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">身份证号</label>
        <div class="layui-input-block">
            <input type="text" name="empIdCard" lay-verify="required" lay-reqtext="身份证号不能为空" placeholder="请输入手机" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工生日</label>
        <div class="layui-input-block">
            <input type="text" name="empBirthday" placeholder="请输入员工生日" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工国籍</label>
        <div class="layui-input-block">
            <input type="text" name="empCountry" placeholder="请输入员工国籍" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">所在部门号</label>
        <div class="layui-input-block">
            <input type="text" name="empDeptId" class="layui-input" placeholder="请输入所在部门号"value="">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">职位</label>
        <div class="layui-input-block">
            <input type="text" name="empDuty" class="layui-input" placeholder="请输入职位"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">联系email地址</label>
        <div class="layui-input-block">
            <input type="text" name="empEmail"class="layui-input" placeholder="请输入联系email地址"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">健康状况</label>
        <div class="layui-input-block">
            <input type="text" name="empHealth" class="layui-input" placeholder="请输入健康状况"value="">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">家庭住址</label>
        <div class="layui-input-block">
            <input  type="text" name="empHomeAddress" class="layui-input" placeholder="请输入家庭住址"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">员工籍贯</label>
        <div class="layui-input-block">
            <input type="text" name="empHometown" class="layui-input" placeholder="请输入员工籍贯"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">工作岗位代号</label>
        <div class="layui-input-block">
            <input type="text" name="empJobId" class="layui-input" placeholder="请输入工作岗位代号"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">婚姻状况</label>
        <div class="layui-input-block">
            <input type="text" name="empMarriage" class="layui-input" placeholder="请输入婚姻状况"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">员工民族</label>
        <div class="layui-input-block">
            <input type="text" name="empNation" class="layui-input" placeholder="请输入员工民族"value="">
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">参加工作时间</label>
        <div class="layui-input-block">
            <input type="text" name="empStartWork" class="layui-input" placeholder="请输入参加工作时间"value="">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">员工状态</label>
        <div class="layui-input-block">
            <input type="text" name="empState" class="layui-input" placeholder="请输入员工状态"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">健康状况</label>
        <div class="layui-input-block">
            <input type="text" name="empHealth" class="layui-input" placeholder="请输入健康状况"value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">
            <input type="text" name="empTeleNo" class="layui-input" placeholder="请输入联系电话" value="">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">学历</label>
        <div class="layui-input-block">
            <input type="text" name="empXl" class="layui-input" placeholder="请输入学历" value="">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>
</div>
<script src="../../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.$;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            const shuju=data.field
            shuju.status = 1000000
            const http = localStorage.getItem('http')
            $.ajax({
                method:"POST",
                data:JSON.stringify(shuju),
                contentType:'application/json',
                url:http+`/Personnels/save`,
                success:function (result){
                    var index = parent.layer.getFrameIndex(window.name)
                    parent.layer.close(index)
                    window.parent.location.reload()
                }
            })
            return false;
        });

    });
</script>
    </div>
</body>
</html>
